{include file="common/_meta" /}
<title>用户管理</title>
<meta name="keywords" content="李志立，lizhilimaster@163.com">
<meta name="description" content="李志立，lizhilimaster@163.com">
</head>
<body>
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 用户中心 <span class="c-gray en">&gt;</span>
		查看记录 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);"
		 title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
	<div class="page-container">
		<div class="text-c">
			<form action="" method="get">
				<input type="hidden" name="fromUserId" value="{$fromUserId}"></input>
				<input type="hidden" name="toUserId" value="{$toUserId}"></input>
				<input type="text" class="input-text" style="width:250px" placeholder="输入用户名" value="{$key}" name="key">
				<button type="submit" class="btn btn-success radius"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
			</form>
		</div>
		<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"></span> <span class="r">共有数据：<strong>{$count1}</strong>
				条</span> </div>
		<div class="mt-20">
			<table class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
						<th width="80">发送头像</th>
						<th width="100">发送方</th>
						<th width="100">类型</th>
						<th width="130">内容</th>
						<th width="130">加入时间</th>
					</tr>
				</thead>
				<tbody>
					{volist name="user" id="vo"}
					<tr class="text-c">
						<td>
							{if $vo.toFace}
							<img src="{$vo.toFace}" height="80">
							{else /}
							没有上传头像
							{/if}
						</td>
						<td>{$vo.toName}</td>
						<td>{$vo.msgType}</td>
						<td>{$vo.content}</td>
						<td>{$vo.create_time|date='Y-m-d H:i:s'}</td>

					</tr>
					{/volist}
				</tbody>
			</table>
			{$user|raw}
		</div>
	</div>
	{include file="common/_footer" /}
	<script type="text/javascript">
		/*用户-添加*/
		function user_add(title, url, w, h) {
			layer_show(title, url, w, h);
		}
		/*管理员-停用*/
		function user_stop(obj, id) {
			layer.confirm('确认要停用吗？', function(index) {
				$.post(
					"{:url('user/ajax')}", {
						id: id,
						type: 'user_stop',
					},
					function(result) {
						if (result.code === 1) {
							layer.msg('已停用!', {
								icon: 5,
								time: 1000
							},function (){
								location.reload();
							});
						} else {
							layer.msg('停用失败!', {
								icon: 5,
								time: 1000
							});
						}
					});
			});
		}
		/*管理员-启用*/
		function user_start(obj, id) {
			layer.confirm('确认要启用吗？', function(index) {
				$.post(
					"{:url('user/ajax')}", {
						id: id,
						type: 'user_start',
					},
					function(result) {
						if (result === 1) {
							layer.msg('已启用!', {
								icon: 6,
								time: 1000
							},function (){
								location.reload();
							});
						} else {
							layer.msg('启动失败!', {
								icon: 5,
								time: 1000
							});
						}
					});
			});
		}
	</script>
</body>
</html>
